package com.muyu.model.excel;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName: ExportExcelLogInfo
 * @Author: Zirun.Xin
 * @Date: 2025/4/11 下午2:34
 * @Version: 1.0
 * @Description: excel导出日志信息对象
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ExportExcelLogInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 日志类型
     */
    @Excel(name = "日志类型", width = 10.0)
    private String type;

    /**
     * 接口名称
     */
    @Excel(name = "接口名称", width = 20.0)
    private String operation;

    /**
     * 接口返回状态码
     */
    @Excel(name = "接口返回状态码", width = 15.0)
    private String responseCode;

    /**
     * 请求时间
     */
    @Excel(name = "请求时间", format = "yyyy-MM-dd HH:mm:ss", width = 20.0)
    private Date operateTime;

    /**
     * 消耗时间
     */
    @Excel(name = "消耗时间", width = 10.0)
    private Long spendTime;

    /**
     * url
     */
    @Excel(name = "url", width = 25.0)
    private String url;

    /**
     * 请求体
     */
    @Excel(name = "请求体", width = 60.0)
    private String body;

    /**
     * ip
     */
    @Excel(name = "ip", width = 15.0)
    private String ip;

    /**
     * 查询参数
     */
    @Excel(name = "查询参数", width = 20.0)
    private String query;

    /**
     * 异常信息
     */
    @Excel(name = "异常信息", width = 60.0)
    private String exception;
}
